/**
 * related to setting.ui
 * 
 * @Author : 2037630@163.com
 * @Timestamp : 2017-04-19
 */
var notify = sm("do_Notification");
var Controller = require("core/controller");
var constant = require('config/constant');
var log = require("util/log")
var navigate = require("util/navigate")
var router = require("config/router")
var external = sm("do_External")
var telphone = ui("telphone");
var storage = require('util/storage')
var user = require('module/userModule')
var app=sm("do_App")
Controller({
	config : {
		name : "setting",
		header : {
			title : "设置"
		}
	},
	ui : {
		telphone : "telphone"
	},
	loaded : function() {
		log.info("test load")
		log.info(user.data.userPhoto)
	},
	data : {
		"pass" : '我要反馈'
	},
	event : {
		"feedback" : {
			"touch" : function() {
				navigate.redirectTo({
					view : router.user.feedback,
					data : {
						a : 1123123
					}
				})
			}
		},
		"mrcui" : {
			"touch" : function() {
				navigate.redirectTo({
					view : router.user.about,
					data : {
						a : 1123123
					}
				})
			}
		},
		"contactUs" : {
			"touch" : function() {
				log.info(telphone.text);
				external.openDial(telphone.text)
			}
		},
		"logout" : {
			"touch" : function() {
				user.logout()
			}
		}
	}
})
